From 23a3cd6822a7faf57d5ae22d99f0a743fc8d829d Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 1 Dec 2015 04:24:49 +0100 Subject: [PATCH] Add dicomdictpath differently --- CMake/dcmtkMacros.cmake | 4 +- CMake/dcmtkPrepare.cmake | 2 +- CMake/osconfig.h.in | 12 +++++ config/aclocal.m4 | 41 ++++++++++++++++ config/configure | 60 +++++++++++++++++++++++ config/include/dcmtk/config/osconfig.h.in | 6 +++ dcmdata/data/CMakeLists.txt | 3 +- dcmjpls/CMakeLists.txt | 2 +- dcmjpls/apps/CMakeLists.txt | 2 +- dcmjpls/libcharls/CMakeLists.txt | 2 +- dcmjpls/libsrc/CMakeLists.txt | 4 +- dcmjpls/libsrc/djcodecd.cc | 2 +- dcmjpls/libsrc/djcodece.cc | 2 +- dcmjpls/libsrc/djerror.h | 2 +- dcmnet/libsrc/dul.cc | 2 +- dcmnet/libsrc/dulfsm.cc | 2 +- dcmqrdb/docs/dcmqrcnf.txt | 4 +- dcmqrdb/etc/dcmqrscp.cfg | 32 +++++++----- debian/rules | 2 +- ofstd/tests/toption.cc | 5 ++ 20 files changed, 163 insertions(+), 28 deletions(-) diff --git a/CMake/dcmtkMacros.cmake b/CMake/dcmtkMacros.cmake index a14d1a81..1be07e99 100644 --- a/CMake/dcmtkMacros.cmake +++ b/CMake/dcmtkMacros.cmake @@ -55,11 +55,11 @@ MACRO(DCMTK_ADD_EXECUTABLE PROGRAM) ENDIF(WIN32 AND NOT MINGW) # Collect executable as part of global DCMTK_EXECUTABLE_TARGETS property - SET_PROPERTY(GLOBAL APPEND PROPERTY DCMTK_EXECUTABLE_TARGETS ${PROGRAM}) +# SET_PROPERTY(GLOBAL APPEND PROPERTY DCMTK_EXECUTABLE_TARGETS ${PROGRAM}) # declare installation files, also export DCMTKTargets.cmake INSTALL(TARGETS ${PROGRAM} - EXPORT DCMTKTargets +# EXPORT DCMTKTargets COMPONENT bin DESTINATION ${DCMTK_INSTALL_BINDIR}) ENDIF(BUILD_APPS) diff --git a/CMake/dcmtkPrepare.cmake b/CMake/dcmtkPrepare.cmake index 54ebdb58..49233ebf 100644 --- a/CMake/dcmtkPrepare.cmake +++ b/CMake/dcmtkPrepare.cmake @@ -56,7 +56,7 @@ SET(DCMTK_PACKAGE_VERSION_SUFFIX "") #SET(DCMTK_PACKAGE_URL "http://www.dcmtk.org/") # Shared library version information -SET(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_PACKAGE_VERSION}" SOVERSION "${DCMTK_ABI_VERSION}") +SET(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_PACKAGE_VERSION}.abi2" SOVERSION "${DCMTK_ABI_VERSION}") # General build options and settings OPTION(BUILD_APPS "Build command line applications and test programs." ON) diff --git a/CMake/osconfig.h.in b/CMake/osconfig.h.in index 2b6325d8..1b0943a8 100644 --- a/CMake/osconfig.h.in +++ b/CMake/osconfig.h.in @@ -1132,4 +1132,16 @@ typedef unsigned long ulong; /* The path on the Android device that should be used for temporary files */ #cmakedefine ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@" +/* Define if the compiler supports __alignof__ */ +#cmakedefine HAVE_GNU_ALIGNOF + +/* Define if the compiler supports __alignof */ +#cmakedefine HAVE_MS_ALIGNOF + +/* Define if the compiler supports __attribute__(aligned) */ +#cmakedefine HAVE_ATTRIBUTE_ALIGNED + +/* Define if the compiler supports __declspec(align) */ +#cmakedefine HAVE_DECLSPEC_ALIGN + #endif /* !OSCONFIG_H*/ diff --git a/config/aclocal.m4 b/config/aclocal.m4 index 78e457e1..80bffb8d 100644 --- a/config/aclocal.m4 +++ b/config/aclocal.m4 @@ -1490,6 +1490,47 @@ else fi ]) +AC_DEFUN([AC_CHECK_ALIGNOF], +[ + AC_MSG_CHECKING([for __alignof__]) + AC_LINK_IFELSE( + [ + AC_LANG_SOURCE( + [ + int main(){char c[__alignof__(int)];return 0;} + ]) + ], + [dcmtk_have_alignof=[yes]], + [dcmtk_have_alignof=[no]] + ) + if test "$dcmtk_have_alignof" = yes; then + AC_MSG_RESULT([yes]) + AC_DEFINE($1,[1],[Define if __alignof__ is available]) + else + AC_MSG_RESULT([no]) + fi +]) + +AC_DEFUN([AC_CHECK_ATTRIBUTE_ALIGNED], +[ + AC_MSG_CHECKING([for __attribute__((aligned))]) + AC_LINK_IFELSE( + [ + AC_LANG_SOURCE( + [ + int main(){__attribute__((aligned(4))) char c[16];return 0;} + ]) + ], + [dcmtk_have_attribute_aligned=[yes]], + [dcmtk_have_attribute_aligned=[no]] + ) + if test "$dcmtk_have_attribute_aligned" = yes; then + AC_MSG_RESULT([yes]) + AC_DEFINE($1,[1],[Define if __attribute__((aligned)) is available]) + else + AC_MSG_RESULT([no]) + fi +]) dnl dnl CHECK_VLA checks if the C Compiler supports variable-length arrays diff --git a/config/configure b/config/configure index a5d0bd5a..c8970403 100755 --- a/config/configure +++ b/config/configure @@ -15001,6 +15001,66 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __alignof__" >&5 +$as_echo_n "checking for __alignof__... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + int main(){char c__alignof__(int);return 0;} + + +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + dcmtk_have_alignof=yes +else + dcmtk_have_alignof=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$dcmtk_have_alignof" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_GNU_ALIGNOF 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((aligned))" >&5 +$as_echo_n "checking for __attribute__((aligned))... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + int main(){__attribute__((aligned(4))) char c16;return 0;} + + +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + dcmtk_have_attribute_aligned=yes +else + dcmtk_have_attribute_aligned=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$dcmtk_have_attribute_aligned" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + CFLAGS="$DEBUGCFLAGS $CFLAGS" CXXFLAGS="$DEBUGCXXFLAGS $CXXFLAGS" diff --git a/config/include/dcmtk/config/osconfig.h.in b/config/include/dcmtk/config/osconfig.h.in index 0b7399b2..80e9884c 100644 --- a/config/include/dcmtk/config/osconfig.h.in +++ b/config/include/dcmtk/config/osconfig.h.in @@ -91,6 +91,9 @@ /* Define if __attribute__((aligned)) is available */ #undef HAVE_ATTRIBUTE_ALIGNED +/* Define if __attribute__((aligned)) is available */ +#undef HAVE_ATTRIBUTE_ALIGNED + /* Define to 1 if you have the `bcmp' function. */ #undef HAVE_BCMP @@ -286,6 +289,9 @@ /* Define if __alignof__ is available */ #undef HAVE_GNU_ALIGNOF +/* Define if __alignof__ is available */ +#undef HAVE_GNU_ALIGNOF + /* Define to 1 if you have the header file. */ #undef HAVE_GRP_H diff --git a/dcmdata/data/CMakeLists.txt b/dcmdata/data/CMakeLists.txt index 976506b7..e3361ae3 100644 --- a/dcmdata/data/CMakeLists.txt +++ b/dcmdata/data/CMakeLists.txt @@ -1,2 +1,3 @@ # declare installation files -INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data) +INSTALL(FILES dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data) +INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic DESTINATION ${DCMTK_INSTALL_DATDIC} COMPONENT data) diff --git a/dcmjpls/CMakeLists.txt b/dcmjpls/CMakeLists.txt index e1146637..c92ac5bf 100644 --- a/dcmjpls/CMakeLists.txt +++ b/dcmjpls/CMakeLists.txt @@ -2,6 +2,6 @@ PROJECT(dcmjpls) # recurse into subdirectories -FOREACH(SUBDIR libsrc libcharls apps include) +FOREACH(SUBDIR libsrc apps include) ADD_SUBDIRECTORY(${SUBDIR}) ENDFOREACH(SUBDIR) diff --git a/dcmjpls/apps/CMakeLists.txt b/dcmjpls/apps/CMakeLists.txt index 2e881d72..8d7bcc32 100644 --- a/dcmjpls/apps/CMakeLists.txt +++ b/dcmjpls/apps/CMakeLists.txt @@ -8,5 +8,5 @@ ENDFOREACH(PROGRAM) # make sure executables are linked to the corresponding libraries FOREACH(PROGRAM dcmcjpls dcmdjpls dcml2pnm) - DCMTK_TARGET_LINK_MODULES(${PROGRAM} dcmjpls charls dcmimage dcmimgle dcmdata oflog ofstd ofstd) + DCMTK_TARGET_LINK_MODULES(${PROGRAM} dcmjpls CharLS dcmimage dcmimgle dcmdata oflog ofstd ofstd) ENDFOREACH(PROGRAM) diff --git a/dcmjpls/libcharls/CMakeLists.txt b/dcmjpls/libcharls/CMakeLists.txt index 99371f70..1f1ee75f 100644 --- a/dcmjpls/libcharls/CMakeLists.txt +++ b/dcmjpls/libcharls/CMakeLists.txt @@ -1,5 +1,5 @@ # declare additional include directories -INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/libcharls ${ofstd_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${ofstd_SOURCE_DIR}/include) # create library from source files DCMTK_ADD_LIBRARY(charls header intrface jpegls) diff --git a/dcmjpls/libsrc/CMakeLists.txt b/dcmjpls/libsrc/CMakeLists.txt index 8a7b4e89..40d46631 100644 --- a/dcmjpls/libsrc/CMakeLists.txt +++ b/dcmjpls/libsrc/CMakeLists.txt @@ -1,7 +1,7 @@ # declare additional include directories -INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${dcmjpls_SOURCE_DIR}/libcharls ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${ZLIB_INCDIR}) # create library from source files DCMTK_ADD_LIBRARY(dcmjpls djcparam djdecode djencode djrparam djcodecd djutils djcodece) -DCMTK_TARGET_LINK_MODULES(dcmjpls ofstd oflog dcmdata dcmimgle dcmimage charls) +DCMTK_TARGET_LINK_MODULES(dcmjpls ofstd oflog dcmdata dcmimgle dcmimage CharLS) diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc index a6c0c6fe..bea4f619 100644 --- a/dcmjpls/libsrc/djcodecd.cc +++ b/dcmjpls/libsrc/djcodecd.cc @@ -37,7 +37,7 @@ #include "djerror.h" /* for private class DJLSError */ // JPEG-LS library (CharLS) includes -#include "intrface.h" +#include "CharLS/interface.h" E_TransferSyntax DJLSLosslessDecoder::supportedTransferSyntax() const { diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc index 261fec82..970dd035 100644 --- a/dcmjpls/libsrc/djcodece.cc +++ b/dcmjpls/libsrc/djcodece.cc @@ -55,7 +55,7 @@ #include "dcmtk/dcmimgle/dcmimage.h" /* for class DicomImage */ // JPEG-LS library (CharLS) includes -#include "intrface.h" +#include "CharLS/interface.h" BEGIN_EXTERN_C #ifdef HAVE_FCNTL_H diff --git a/dcmjpls/libsrc/djerror.h b/dcmjpls/libsrc/djerror.h index d625c48a..4f5c6700 100644 --- a/dcmjpls/libsrc/djerror.h +++ b/dcmjpls/libsrc/djerror.h @@ -24,7 +24,7 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/dcmjpls/djlsutil.h" /* For the OFCondition codes */ -#include "intrface.h" /* CharLS include */ +#include "CharLS/interface.h" /* CharLS include */ /** Helper class for converting between dcmjpls and CharLS error codes */ diff --git a/dcmnet/libsrc/dul.cc b/dcmnet/libsrc/dul.cc index 434681a1..91ee7261 100644 --- a/dcmnet/libsrc/dul.cc +++ b/dcmnet/libsrc/dul.cc @@ -1833,7 +1833,7 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } #endif - setTCPBufferLength(sock); + //setTCPBufferLength(sock); #ifndef DONT_DISABLE_NAGLE_ALGORITHM /* diff --git a/dcmnet/libsrc/dulfsm.cc b/dcmnet/libsrc/dulfsm.cc index edf7f30d..5d971977 100644 --- a/dcmnet/libsrc/dulfsm.cc +++ b/dcmnet/libsrc/dulfsm.cc @@ -2421,7 +2421,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } #endif - setTCPBufferLength(s); + //setTCPBufferLength(s); #ifndef DONT_DISABLE_NAGLE_ALGORITHM /* diff --git a/dcmqrdb/docs/dcmqrcnf.txt b/dcmqrdb/docs/dcmqrcnf.txt index 0ff2daeb..9f579d33 100644 --- a/dcmqrdb/docs/dcmqrcnf.txt +++ b/dcmqrdb/docs/dcmqrcnf.txt @@ -44,8 +44,8 @@ Example: NetworkTCPPort = 104 MaxPDUSize = 8192 MaxAssociations = 20 -UserName = (do not change user) -GroupName = (do not change group) +UserName = "dcmtk" +GroupName = "dcmtk" NOTE: You must have root privileges to bind port 104 for DICOM association requests on Unix/Linux/Posix platforms as this is a privileged port number diff --git a/dcmqrdb/etc/dcmqrscp.cfg b/dcmqrdb/etc/dcmqrscp.cfg index 9b9b94ca..de9fb4df 100644 --- a/dcmqrdb/etc/dcmqrscp.cfg +++ b/dcmqrdb/etc/dcmqrscp.cfg @@ -10,6 +10,9 @@ NetworkTCPPort = 104 MaxPDUSize = 16384 MaxAssociations = 16 +UserName = "dcmtk" +GroupName = "dcmtk" + # # UserName = # GroupName = @@ -28,12 +31,13 @@ HostTable BEGIN # NOTE: in the current implementation you cannot substitute an IP address # for a hostname. # -acme1 = (ACME1, acmehost1, 5678) -acme2 = (ACME2, acmehost2, 5678) -acmeCTcompany = acme1, acme2 -united1 = (UNITED1, unitedhost1, 104) -united2 = (UNITED2, unitedhost2, 104) -unitedMRcompany = united1, united2 +# Example: +#acme1 = (ACME1, acmehost1, 5678) +#acme2 = (ACME2, acmehost2, 5678) +#acmeCTcompany = acme1, acme2 +#united1 = (UNITED1, unitedhost1, 104) +#united2 = (UNITED2, unitedhost2, 104) +#unitedMRcompany = united1, united2 # HostTable END @@ -51,8 +55,9 @@ VendorTable BEGIN # VendorName = SymbolicName # The symbolic name should be defined in the HostTable. # -"Acme CT Company" = acmeCTcompany -"United MR Company" = unitedMRcompany +# Example: +#"Acme CT Company" = acmeCTcompany +#"United MR Company" = unitedMRcompany # VendorTable END @@ -70,8 +75,13 @@ AETable BEGIN # Entry in HostTable | # ANY # -COMMON /home/dicom/db/COMMON R (200, 1024mb) ANY -ACME_STORE /home/dicom/db/ACME_STORE RW (9, 1024mb) acmeCTcompany -UNITED_STORE /home/dicom/db/UNITED_STORE RW (9, 1024mb) unitedMRcompany +# Example: +# +#ACME_STORE /var/lib/dcmtk/db/ACME_STORE RW (9, 1024mb) acmeCTcompany +#UNITED_STORE /var/lib/dcmtk/db/UNITED_STORE RW (9, 1024mb) unitedMRcompany +# +# Uncomment and adjust the following lines for a common r/rw storage area: +#READWRITE /var/lib/dcmtk/db/READWRITE RW (10, 1024mb) ANY +#READ /var/lib/dcmtk/db/READ R (200, 1024mb) ANY # AETable END diff --git a/debian/rules b/debian/rules index e4ac6710..051a00da 100755 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,7 @@ export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed # needed for the tests -export DCMDICTPATH=dcmdata/data/dicom.dic +DEB_CONFIGURE_SCRIPT_ENV += DCMDICTPATH=dcmdata/data/dicom.dic # deduce documentation option (build-indep target) ifeq "" "$(filter %-doc,$(shell dh_listpackages))" diff --git a/ofstd/tests/toption.cc b/ofstd/tests/toption.cc index 3a22fb78..bc96a574 100644 --- a/ofstd/tests/toption.cc +++ b/ofstd/tests/toption.cc @@ -17,6 +17,11 @@ OFTEST(ofstd_optional) OFoptional o0( 3 ), o1, o2( OFnullopt ); + COUT << OFalignof(OFoptional) << ' ' << sizeof(OFoptional) << OFendl; + COUT << OFalignof(OFoptional) << ' ' << sizeof(OFoptional) << OFendl; + COUT << OFalignof(OFoptional) << ' ' << sizeof(OFoptional) << OFendl; + COUT << OFalignof(long) << ' ' << sizeof(long) << ' ' << OFalignof(OFoptional) << ' ' << sizeof(OFoptional) << OFendl; + OFCHECK( o0 && *o0 == 3 ); OFCHECK( !o1 && !o2 ); -- 2.30.2